const ProjectRequest = require("../project/project_request.js");
const Url = require("../utils/url.js");

/** 
 * 滚动图片列表
 */
function slideList(callback){
  const url = "/index/slide/list";
  ProjectRequest.getRequest(url, callback);
}

/** 
 * 模块列表
 */
function moduleList(callback) {
  const url = "/index/module/list";
  ProjectRequest.getRequest(url, callback);
}

/** 
 * 分页模块
 */
function pageModule(startPage, callback) {
  const URL = Url.newInstance("/index/module/page/list");
  URL.setPara('startPage', startPage)
  ProjectRequest.getRequest(URL.get(), callback);
}

/** 
 * 滚动图片列表
 */
function messageList(callback) {
  const url = "/index/message/list";
  ProjectRequest.getRequest(url, callback);
}

/**
 * exports
 */
module.exports = {
  slideList,
  moduleList,
  pageModule,
  messageList
};